"""
样式管理模块
提供两套淡雅清晰的UI样式
"""

class StyleManager:
    """样式管理器，提供多套样式表以供选择"""
    
    @staticmethod
    def get_light_blue_style():
        """获取淡蓝色主题样式 - 清新典雅"""
        return """
            /* 全局样式 */
            QWidget {
                font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
                font-size: 9pt;
                color: #333333;
            }
            
            /* 主窗口样式 */
            QMainWindow {
                background-color: #f6f9fc;
            }
            
            /* 顶部容器样式 */
            #TopContainer {
                background-color: #e8f0f7;
                border-bottom: 1px solid #d0e1f0;
            }
            
            /* 主容器样式 */
            #MainContainer {
                background-color: #f6f9fc;
            }
            
            /* 标签页样式 */
            QTabWidget::pane {
                border: none;
                background-color: #e8f0f7;
            }
            
            QTabBar::tab {
                background-color: #d0e1f0;
                border: 1px solid #b9d3e8;
                border-bottom: none;
                border-top-left-radius: 4px;
                border-top-right-radius: 4px;
                padding: 6px 12px;
                margin-right: 2px;
                color: #4a6d8c;
            }
            
            QTabBar::tab:selected {
                background-color: #e8f0f7;
                color: #2c4d69;
                font-weight: bold;
            }
            
            QTabBar::tab:hover:!selected {
                background-color: #dae8f3;
            }
            
            /* 按钮样式 */
            QPushButton {
                background-color: #d0e1f0;
                border: 1px solid #b9d3e8;
                border-radius: 4px;
                padding: 4px 10px;
                color: #2c4d69;
            }
            
            QPushButton:hover {
                background-color: #c2d8eb;
            }
            
            QPushButton:pressed {
                background-color: #b9d3e8;
            }
            
            /* 工具按钮样式 */
            QToolButton {
                background-color: transparent;
                border: 1px solid transparent;
                border-radius: 4px;
                padding: 3px;
                color: #4a6d8c;
            }
            
            QToolButton:hover {
                background-color: #d0e1f0;
                border: 1px solid #b9d3e8;
            }
            
            QToolButton:pressed {
                background-color: #b9d3e8;
            }
            
            /* 停靠窗口样式 */
            QDockWidget {
                titlebar-close-icon: url(icons/close.png);
                titlebar-normal-icon: url(icons/undock.png);
            }
            
            QDockWidget::title {
                background-color: #d0e1f0;
                padding: 5px;
                border: 1px solid #b9d3e8;
                border-bottom: none;
                color: #2c4d69;
                text-align: left;
                padding-left: 10px;
            }
            
            QDockWidget::close-button, QDockWidget::float-button {
                border: 1px solid transparent;
                background: transparent;
                padding: 2px;
            }
            
            QDockWidget::close-button:hover, QDockWidget::float-button:hover {
                background: #c2d8eb;
                border-radius: 2px;
            }
            
            /* 滚动条样式 */
            QScrollBar:vertical {
                background: #e8f0f7;
                width: 10px;
                margin: 0px;
            }
            
            QScrollBar::handle:vertical {
                background: #b9d3e8;
                min-height: 20px;
                border-radius: 5px;
            }
            
            QScrollBar::handle:vertical:hover {
                background: #a3c5e0;
            }
            
            QScrollBar::add-line:vertical, QScrollBar::sub-line:vertical {
                height: 0px;
            }
            
            QScrollBar:horizontal {
                background: #e8f0f7;
                height: 10px;
                margin: 0px;
            }
            
            QScrollBar::handle:horizontal {
                background: #b9d3e8;
                min-width: 20px;
                border-radius: 5px;
            }
            
            QScrollBar::handle:horizontal:hover {
                background: #a3c5e0;
            }
            
            QScrollBar::add-line:horizontal, QScrollBar::sub-line:horizontal {
                width: 0px;
            }
            
            /* 工具栏样式 */
            QToolBar {
                background-color: #e8f0f7;
                border: none;
                spacing: 3px;
                padding: 2px;
            }
            
            /* 状态栏样式 */
            QStatusBar {
                background-color: #e8f0f7;
                color: #4a6d8c;
                border-top: 1px solid #d0e1f0;
            }
            
            QStatusBar::item {
                border: none;
            }
            
            /* 菜单样式 */
            QMenu {
                background-color: #e8f0f7;
                border: 1px solid #b9d3e8;
                color: #2c4d69;
            }
            
            QMenu::item {
                padding: 5px 20px 5px 20px;
                border: 1px solid transparent;
            }
            
            QMenu::item:selected {
                background-color: #d0e1f0;
                border: 1px solid #b9d3e8;
            }
            
            /* 标签样式 */
            QLabel {
                color: #2c4d69;
            }
        """
    
    @staticmethod
    def get_warm_beige_style():
        """获取暖米色主题样式 - 温暖舒适"""
        return """
            /* 全局样式 */
            QWidget {
                font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
                font-size: 9pt;
                color: #5a4a3a;
            }
            
            /* 主窗口样式 */
            QMainWindow {
                background-color: #faf7f2;
            }
            
            /* 顶部容器样式 */
            #TopContainer {
                background-color: #f2ece1;
                border-bottom: 1px solid #e5dac9;
            }
            
            /* 主容器样式 */
            #MainContainer {
                background-color: #faf7f2;
            }
            
            /* 标签页样式 */
            QTabWidget::pane {
                border: none;
                background-color: #f2ece1;
            }
            
            QTabBar::tab {
                background-color: #e5dac9;
                border: 1px solid #d6c7af;
                border-bottom: none;
                border-top-left-radius: 4px;
                border-top-right-radius: 4px;
                padding: 6px 12px;
                margin-right: 2px;
                color: #7d6a52;
            }
            
            QTabBar::tab:selected {
                background-color: #f2ece1;
                color: #5a4a3a;
                font-weight: bold;
            }
            
            QTabBar::tab:hover:!selected {
                background-color: #ece4d7;
            }
            
            /* 按钮样式 */
            QPushButton {
                background-color: #e5dac9;
                border: 1px solid #d6c7af;
                border-radius: 4px;
                padding: 4px 10px;
                color: #5a4a3a;
            }
            
            QPushButton:hover {
                background-color: #ece4d7;
            }
            
            QPushButton:pressed {
                background-color: #d6c7af;
            }
            
            /* 工具按钮样式 */
            QToolButton {
                background-color: transparent;
                border: 1px solid transparent;
                border-radius: 4px;
                padding: 3px;
                color: #7d6a52;
            }
            
            QToolButton:hover {
                background-color: #e5dac9;
                border: 1px solid #d6c7af;
            }
            
            QToolButton:pressed {
                background-color: #d6c7af;
            }
            
            /* 停靠窗口样式 */
            QDockWidget {
                titlebar-close-icon: url(icons/close.png);
                titlebar-normal-icon: url(icons/undock.png);
            }
            
            QDockWidget::title {
                background-color: #e5dac9;
                padding: 5px;
                border: 1px solid #d6c7af;
                border-bottom: none;
                color: #5a4a3a;
                text-align: left;
                padding-left: 10px;
            }
            
            QDockWidget::close-button, QDockWidget::float-button {
                border: 1px solid transparent;
                background: transparent;
                padding: 2px;
            }
            
            QDockWidget::close-button:hover, QDockWidget::float-button:hover {
                background: #ece4d7;
                border-radius: 2px;
            }
            
            /* 滚动条样式 */
            QScrollBar:vertical {
                background: #f2ece1;
                width: 10px;
                margin: 0px;
            }
            
            QScrollBar::handle:vertical {
                background: #d6c7af;
                min-height: 20px;
                border-radius: 5px;
            }
            
            QScrollBar::handle:vertical:hover {
                background: #c4b396;
            }
            
            QScrollBar::add-line:vertical, QScrollBar::sub-line:vertical {
                height: 0px;
            }
            
            QScrollBar:horizontal {
                background: #f2ece1;
                height: 10px;
                margin: 0px;
            }
            
            QScrollBar::handle:horizontal {
                background: #d6c7af;
                min-width: 20px;
                border-radius: 5px;
            }
            
            QScrollBar::handle:horizontal:hover {
                background: #c4b396;
            }
            
            QScrollBar::add-line:horizontal, QScrollBar::sub-line:horizontal {
                width: 0px;
            }
            
            /* 工具栏样式 */
            QToolBar {
                background-color: #f2ece1;
                border: none;
                spacing: 3px;
                padding: 2px;
            }
            
            /* 状态栏样式 */
            QStatusBar {
                background-color: #f2ece1;
                color: #7d6a52;
                border-top: 1px solid #e5dac9;
            }
            
            QStatusBar::item {
                border: none;
            }
            
            /* 菜单样式 */
            QMenu {
                background-color: #f2ece1;
                border: 1px solid #d6c7af;
                color: #5a4a3a;
            }
            
            QMenu::item {
                padding: 5px 20px 5px 20px;
                border: 1px solid transparent;
            }
            
            QMenu::item:selected {
                background-color: #e5dac9;
                border: 1px solid #d6c7af;
            }
            
            /* 标签样式 */
            QLabel {
                color: #5a4a3a;
            }
        """ 